<template>
  <div class="app">
    <button @click="counter++">+1</button>
    <button @click="showTitle=false">隐藏</button>
    <h2 v-if="showTitle" class="title" v-why>当前计数：{{counter}}</h2>

    <hr>
    <h2 v-unit>123</h2>
    <h2 v-unit="'$'">456</h2>

    <hr>
    <h2 v-why:kobe.abc.cba="message">哈哈哈</h2>
  </div>
</template>

<script setup>

import {ref} from 'vue'
const counter = ref(0)
const showTitle=ref(true)
const message='你好啊，李银河'
const vWhy={
  mounted(el,bindings){
    console.log("vWhy-bindings:",bindings)
    el.textContent=bindings.value
  }
}

</script>
